gtk4.git
8 years agogl renderer: Ignore shadow color matrix nodes...
Timm Bäder [Wed, 6 Dec 2017 15:45:43 +0000 (16:45 +0100)]
gl renderer: Ignore shadow color matrix nodes...

... if the color matrix nodes don't touch the child alpha.

8 years agogl renderer: Add a helper function
Timm Bäder [Wed, 6 Dec 2017 15:07:18 +0000 (16:07 +0100)]
gl renderer: Add a helper function

We'll use this for the common case of a color matrix node inside a
shadow node.

8 years agogl renderer: Don't zero initialize render ops GArray
Timm Bäder [Tue, 5 Dec 2017 17:05:12 +0000 (18:05 +0100)]
gl renderer: Don't zero initialize render ops GArray

8 years agogl renderer: Avoid crashing tooltips
Timm Bäder [Tue, 5 Dec 2017 16:49:25 +0000 (17:49 +0100)]
gl renderer: Avoid crashing tooltips

8 years agogl renderer: Sort border sides by color
Timm Bäder [Tue, 5 Dec 2017 12:46:29 +0000 (13:46 +0100)]
gl renderer: Sort border sides by color

8 years agogl renderer: Keep track of border program state
Timm Bäder [Tue, 5 Dec 2017 07:38:42 +0000 (08:38 +0100)]
gl renderer: Keep track of border program state

8 years agogl renderer: Avoid using a new modelview for shadow nodes
Timm Bäder [Tue, 5 Dec 2017 07:01:10 +0000 (08:01 +0100)]
gl renderer: Avoid using a new modelview for shadow nodes

We can just move the vertex data directly.

8 years agogl renderer: Default to GL_LINEAR scaling filters
Timm Bäder [Sun, 3 Dec 2017 21:14:33 +0000 (22:14 +0100)]
gl renderer: Default to GL_LINEAR scaling filters

8 years agogl renderer: Remove superfluous modelview matrix changes
Timm Bäder [Sun, 3 Dec 2017 19:16:01 +0000 (20:16 +0100)]
gl renderer: Remove superfluous modelview matrix changes

8 years agogl renderer: Remove unused struct member
Timm Bäder [Sun, 3 Dec 2017 18:47:20 +0000 (19:47 +0100)]
gl renderer: Remove unused struct member

8 years agogl renderer: Keep track of color matrix op state
Timm Bäder [Sun, 3 Dec 2017 18:15:33 +0000 (19:15 +0100)]
gl renderer: Keep track of color matrix op state

8 years agogl renderer: Avoid consecutive opacity ops
Timm Bäder [Sun, 3 Dec 2017 15:58:01 +0000 (16:58 +0100)]
gl renderer: Avoid consecutive opacity ops

8 years agogl renderer: Define debug structs inline
Timm Bäder [Sun, 3 Dec 2017 15:54:34 +0000 (16:54 +0100)]
gl renderer: Define debug structs inline

8 years agogl renderer: Add more detailed render op output
Timm Bäder [Sun, 3 Dec 2017 08:04:07 +0000 (09:04 +0100)]
gl renderer: Add more detailed render op output

8 years agogl renderer: Only draw blurred shadow nodes once
Timm Bäder [Sat, 2 Dec 2017 10:17:46 +0000 (11:17 +0100)]
gl renderer: Only draw blurred shadow nodes once

8 years agogl renderer: Remove consecutive clip ops
Timm Bäder [Sat, 2 Dec 2017 10:02:31 +0000 (11:02 +0100)]
gl renderer: Remove consecutive clip ops

8 years agogl renderer: Rename a macro
Timm Bäder [Fri, 1 Dec 2017 12:56:56 +0000 (13:56 +0100)]
gl renderer: Rename a macro

8 years agogl renderer: Fix debugging output
Timm Bäder [Fri, 1 Dec 2017 11:29:27 +0000 (12:29 +0100)]
gl renderer: Fix debugging output

8 years agogl renderer: Implement simple border nodes
Timm Bäder [Fri, 1 Dec 2017 10:55:10 +0000 (11:55 +0100)]
gl renderer: Implement simple border nodes

8 years agogl renderer: Don't render unblurred text shadows to a texture
Timm Bäder [Fri, 1 Dec 2017 10:02:26 +0000 (11:02 +0100)]
gl renderer: Don't render unblurred text shadows to a texture

We can do the same thing by simply drawing the text in the given shadow
color.

8 years agogl renderer: Split out text rendering function
Timm Bäder [Fri, 1 Dec 2017 09:47:13 +0000 (10:47 +0100)]
gl renderer: Split out text rendering function

We'll use that for text shadow nodes

8 years agogl renderer: Implement simple shadow nodes
Timm Bäder [Fri, 1 Dec 2017 09:27:31 +0000 (10:27 +0100)]
gl renderer: Implement simple shadow nodes

8 years agogl renderer: Split out a utility function
Timm Bäder [Fri, 1 Dec 2017 08:58:58 +0000 (09:58 +0100)]
gl renderer: Split out a utility function

8 years agogl renderer: Fix inset shadow offset calculation
Timm Bäder [Fri, 1 Dec 2017 07:32:00 +0000 (08:32 +0100)]
gl renderer: Fix inset shadow offset calculation

8 years agogl renderer: Implement unblurred outset shadows
Timm Bäder [Fri, 1 Dec 2017 07:30:11 +0000 (08:30 +0100)]
gl renderer: Implement unblurred outset shadows

8 years agogl renderer: Rework program creation
Timm Bäder [Thu, 30 Nov 2017 17:47:55 +0000 (18:47 +0100)]
gl renderer: Rework program creation

Make sure all uniform names have to match between the shader names and
the _location integers we save in every Program struct.

8 years agogl renderer: Implement unblurred inset shadows
Timm Bäder [Thu, 30 Nov 2017 15:48:03 +0000 (16:48 +0100)]
gl renderer: Implement unblurred inset shadows

8 years agogl renderer: Implement blur nodes
Timm Bäder [Sat, 25 Nov 2017 07:56:50 +0000 (08:56 +0100)]
gl renderer: Implement blur nodes

8 years agogl renderer: Remove some unused members
Timm Bäder [Sat, 25 Nov 2017 06:51:00 +0000 (07:51 +0100)]
gl renderer: Remove some unused members

8 years agogl renderer: Keep track of current program color value
Timm Bäder [Fri, 24 Nov 2017 12:18:45 +0000 (13:18 +0100)]
gl renderer: Keep track of current program color value

8 years agogl renderer: Don't draw texture nodes to a framebuffer
Timm Bäder [Fri, 24 Nov 2017 09:43:17 +0000 (10:43 +0100)]
gl renderer: Don't draw texture nodes to a framebuffer

We don't need to create a texture from a texture node. We can simply use
its texture instead and draw it however we want.

8 years agogl renderer: Implement color matrix nodes again
Timm Bäder [Fri, 24 Nov 2017 09:32:08 +0000 (10:32 +0100)]
gl renderer: Implement color matrix nodes again

8 years agogl render ops: Rename a member
Timm Bäder [Fri, 24 Nov 2017 09:24:49 +0000 (10:24 +0100)]
gl render ops: Rename a member

8 years agogl renderer: Factor out a helper function for offscreen drawing
Timm Bäder [Fri, 24 Nov 2017 09:18:51 +0000 (10:18 +0100)]
gl renderer: Factor out a helper function for offscreen drawing

8 years agogl ops: Remove dead code
Timm Bäder [Thu, 23 Nov 2017 19:01:15 +0000 (20:01 +0100)]
gl ops: Remove dead code

This is already checked further up in that function

8 years agogl renderer: Optimize text drawing
Timm Bäder [Thu, 23 Nov 2017 18:49:41 +0000 (19:49 +0100)]
gl renderer: Optimize text drawing

Text nodes will almost always end up using the exact same texture and
the same program. So, in that case we can simply add vertex data for all
the characters we need to draw and use just one draw call.

8 years agogl renderer: Remove unused VAO
Timm Bäder [Thu, 23 Nov 2017 10:30:05 +0000 (11:30 +0100)]
gl renderer: Remove unused VAO

8 years agogl renderer: Stop collecting VAOs in clear_tree
Timm Bäder [Thu, 23 Nov 2017 09:28:30 +0000 (10:28 +0100)]
gl renderer: Stop collecting VAOs in clear_tree

We don't use that part of the gl driver anymore.

8 years agogl renderer: Only check for color glyphs once per text node
Timm Bäder [Thu, 23 Nov 2017 09:10:43 +0000 (10:10 +0100)]
gl renderer: Only check for color glyphs once per text node

It does not depend on the glyph, so no need to do it once for every
glyph.

8 years agogl renderer: Implement cairo nodes again
Timm Bäder [Thu, 23 Nov 2017 09:02:58 +0000 (10:02 +0100)]
gl renderer: Implement cairo nodes again

8 years agogl renderer: Move render ops into separate file
Timm Bäder [Wed, 22 Nov 2017 20:02:50 +0000 (21:02 +0100)]
gl renderer: Move render ops into separate file

8 years agogsk: Move all gskgl* files into gl/
Timm Bäder [Wed, 22 Nov 2017 19:13:46 +0000 (20:13 +0100)]
gsk: Move all gskgl* files into gl/

8 years agogl renderer: Rework once more
Timm Bäder [Wed, 22 Nov 2017 10:32:23 +0000 (11:32 +0100)]
gl renderer: Rework once more

Last time, I swear.

8 years agogl renderer: Don't initialize modelview matrix twice
Timm Bäder [Mon, 20 Nov 2017 14:08:04 +0000 (15:08 +0100)]
gl renderer: Don't initialize modelview matrix twice

8 years agogl renderer: Group render node types by render item creation
Timm Bäder [Mon, 20 Nov 2017 13:30:46 +0000 (14:30 +0100)]
gl renderer: Group render node types by render item creation

8 years agogl renderer: Don't pass MVP to shaders
Timm Bäder [Sun, 19 Nov 2017 13:39:56 +0000 (14:39 +0100)]
gl renderer: Don't pass MVP to shaders

We already pass both modelview and projection matrix individually.

8 years agogl: Add glyph cache
Timm Bäder [Sat, 18 Nov 2017 13:30:57 +0000 (14:30 +0100)]
gl: Add glyph cache

Based on the one used by the vulkan renderer

8 years agogl renderer: Remove unused member
Timm Bäder [Fri, 17 Nov 2017 16:23:27 +0000 (17:23 +0100)]
gl renderer: Remove unused member

8 years agogl renderer: Remove unused shaders
Timm Bäder [Thu, 16 Nov 2017 20:22:02 +0000 (21:22 +0100)]
gl renderer: Remove unused shaders

8 years agotest-render-nodes: Add transformed clip nodes test
Timm Bäder [Thu, 16 Nov 2017 20:10:31 +0000 (21:10 +0100)]
test-render-nodes: Add transformed clip nodes test

8 years agoshowrendernode: Resize window to a reasonable size instead
Timm Bäder [Thu, 16 Nov 2017 20:10:09 +0000 (21:10 +0100)]
showrendernode: Resize window to a reasonable size instead

8 years agogl renderer: Save clip in every node
Timm Bäder [Thu, 16 Nov 2017 20:04:18 +0000 (21:04 +0100)]
gl renderer: Save clip in every node

8 years agogl renderer: Don't create framebuffer for texture opacity children
Timm Bäder [Thu, 16 Nov 2017 11:20:35 +0000 (12:20 +0100)]
gl renderer: Don't create framebuffer for texture opacity children

Slowly a pattern emerges...

8 years agogl renderer: Implement rounded clip nodes
Timm Bäder [Thu, 16 Nov 2017 10:41:16 +0000 (11:41 +0100)]
gl renderer: Implement rounded clip nodes

mostly a proof of concept

8 years agogl renderer: save on some frame buffers
Timm Bäder [Thu, 16 Nov 2017 08:47:19 +0000 (09:47 +0100)]
gl renderer: save on some frame buffers

If the child of a color matrix node is a texture, we can directly use
that instead of drawing it to a texture first and then using that
texture.

8 years agoGskGLDriver: Add profiler
Timm Bäder [Thu, 16 Nov 2017 08:33:20 +0000 (09:33 +0100)]
GskGLDriver: Add profiler

Count the newly created textures, the reused ones and the uploads from
cairo surfaces per frame.

8 years agoGskGLDriver: Use float for texture size in create_texture
Timm Bäder [Wed, 15 Nov 2017 17:40:57 +0000 (18:40 +0100)]
GskGLDriver: Use float for texture size in create_texture

Render nodes can end up with bounds < 1 since they are floats, and the
implicit cast to int ends up creating a texture with 0 width or height.
Use ceil() instead in create_texture so we don't have to do that on the
caller side everywhere.

8 years agotest-render-nodes: Add color matrix test
Timm Bäder [Sat, 11 Nov 2017 11:36:39 +0000 (12:36 +0100)]
test-render-nodes: Add color matrix test

8 years agotest-render-nodes: Print a warning if we didn't generate anything
Timm Bäder [Sat, 11 Nov 2017 08:58:09 +0000 (09:58 +0100)]
test-render-nodes: Print a warning if we didn't generate anything

8 years agobuild: Remove unused variable
Timm Bäder [Thu, 9 Nov 2017 08:51:57 +0000 (09:51 +0100)]
build: Remove unused variable

8 years agoadd tests/showrendernode
Timm Bäder [Sat, 11 Nov 2017 05:41:41 +0000 (06:41 +0100)]
add tests/showrendernode

A .node file viewer.

8 years agoRework the GL renderer
Timm Bäder [Fri, 3 Nov 2017 12:09:02 +0000 (13:09 +0100)]
Rework the GL renderer

8 years agogl renderer: Remove some unused code
Timm Bäder [Fri, 3 Nov 2017 12:03:44 +0000 (13:03 +0100)]
gl renderer: Remove some unused code

8 years agogl driver: Make some members const
Timm Bäder [Thu, 9 Nov 2017 09:55:14 +0000 (10:55 +0100)]
gl driver: Make some members const

8 years agoGskRenderer: Remove viewport property
Timm Bäder [Sat, 4 Nov 2017 19:05:56 +0000 (20:05 +0100)]
GskRenderer: Remove viewport property

8 years agosnapshot: Add & use API for linear gradient nodes
Timm Bäder [Wed, 13 Dec 2017 08:05:49 +0000 (09:05 +0100)]
snapshot: Add & use API for linear gradient nodes

This way, we can also clip the created node bounds to the current clip
of the GtkSnapshot. This works as long as we don't modify the start and
end points, and happens all the time while rendering.

8 years agosnapshot: Directly clip color nodes
Timm Bäder [Tue, 12 Dec 2017 19:33:53 +0000 (20:33 +0100)]
snapshot: Directly clip color nodes

Clipping a color node is trivial so we do it here directly since that
might later save the entire clip node as well as freeing the fragment
shaders from coloring lots of pixels that will be clipped away.

8 years agosnapshot: Fix typo
Timm Bäder [Tue, 12 Dec 2017 19:23:46 +0000 (20:23 +0100)]
snapshot: Fix typo

8 years agox11: Fix wrong condition when unsetting transient-for
Timm Bäder [Tue, 19 Dec 2017 10:53:31 +0000 (11:53 +0100)]
x11: Fix wrong condition when unsetting transient-for

Setting a new transient-for parent is only possible if the given parent
window is valid, not when it is NULL or valid.

8 years agoRemove font-name leftovers
Matthias Clasen [Thu, 21 Dec 2017 16:37:53 +0000 (11:37 -0500)]
Remove font-name leftovers

There were still a few places where the font-name
property was used internally.

8 years agoAdd a missing include
Matthias Clasen [Thu, 21 Dec 2017 17:18:10 +0000 (12:18 -0500)]
Add a missing include

8 years agofont button: Drop the font-name property
Matthias Clasen [Thu, 21 Dec 2017 16:10:44 +0000 (11:10 -0500)]
font button: Drop the font-name property

We already have the GtkFontChooser::font property
which serves the same purpose, so get rid of the
duplication.

8 years agotests: Stop using gtk_font_button_get_font_name
Matthias Clasen [Thu, 21 Dec 2017 16:10:13 +0000 (11:10 -0500)]
tests: Stop using gtk_font_button_get_font_name

It is going away.

8 years agoRemove debug spew
Matthias Clasen [Thu, 21 Dec 2017 13:04:26 +0000 (08:04 -0500)]
Remove debug spew

8 years agoFix a mis-merge
Matthias Clasen [Wed, 20 Dec 2017 15:36:25 +0000 (10:36 -0500)]
Fix a mis-merge

8 years agoImplement font-feature-settings
Matthias Clasen [Wed, 20 Dec 2017 15:29:33 +0000 (10:29 -0500)]
Implement font-feature-settings

This is a missing part of the CSS font level 3 module.

8 years agoUpdate the docs for GtkCssChange
Matthias Clasen [Wed, 20 Dec 2017 13:31:22 +0000 (08:31 -0500)]
Update the docs for GtkCssChange

The docs were out of sync with the flags we actually have.

8 years agogdk: Remove leftover variable
Carlos Garnacho [Tue, 19 Dec 2017 21:58:51 +0000 (22:58 +0100)]
gdk: Remove leftover variable

This is unused and leaked.

8 years agoFix a crash introduced in the previous commit
Matthias Clasen [Tue, 19 Dec 2017 19:17:55 +0000 (14:17 -0500)]
Fix a crash introduced in the previous commit

The signatures of row-inserted and row-deleted are not
identical, so we need to be a bit more careful here.

8 years agofont chooser: Simplify some code
Matthias Clasen [Tue, 19 Dec 2017 16:37:05 +0000 (11:37 -0500)]
font chooser: Simplify some code

Instead of separate handlers, just keep a single
handler for both row-inserted and row-deleted.
Slightly less work that way.

8 years agofont chooser: Stop listening to style-updated
Matthias Clasen [Tue, 19 Dec 2017 16:34:43 +0000 (11:34 -0500)]
font chooser: Stop listening to style-updated

The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.

8 years agogtk4-demo: Fix font-features UI file
Timm Bäder [Tue, 19 Dec 2017 08:46:27 +0000 (09:46 +0100)]
gtk4-demo: Fix font-features UI file

8 years agox11: Guard against NULL window
Timm Bäder [Tue, 19 Dec 2017 06:38:35 +0000 (07:38 +0100)]
x11: Guard against NULL window

Otherwise, the NULL parent window causes a crash in the
GDK_WINDOW_IS_DESTROYED call.

8 years agowindow: Make sure an event has a display
Timm Bäder [Mon, 18 Dec 2017 20:58:53 +0000 (21:58 +0100)]
window: Make sure an event has a display

This fixes a crash happening later on when something tries to access the
event's display.

8 years agoemoji: Skip overly wide fallback rendering
Matthias Clasen [Mon, 18 Dec 2017 03:09:08 +0000 (22:09 -0500)]
emoji: Skip overly wide fallback rendering

Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.

8 years agoAvoid calling unsetenv too late
Matthias Clasen [Wed, 29 Nov 2017 04:27:57 +0000 (23:27 -0500)]
Avoid calling unsetenv too late

Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.

https://bugzilla.gnome.org/show_bug.cgi?id=790963

8 years agocups: Warn only once if colord is not available
Matthias Clasen [Sun, 17 Dec 2017 22:09:55 +0000 (17:09 -0500)]
cups: Warn only once if colord is not available

No need to keep complaining about this.

https://bugzilla.gnome.org/show_bug.cgi?id=791650

8 years agowayland: Handle scale 3 for cursors
Matthias Clasen [Sun, 17 Dec 2017 21:41:00 +0000 (16:41 -0500)]
wayland: Handle scale 3 for cursors

This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.

8 years agoinspector: Allow to bump scale to 3
Matthias Clasen [Sun, 17 Dec 2017 21:40:10 +0000 (16:40 -0500)]
inspector: Allow to bump scale to 3

Might as well allow this, for 'large scale testing'.

8 years agoRemove unneeded deprecation guards
Matthias Clasen [Sun, 17 Dec 2017 18:15:18 +0000 (13:15 -0500)]
Remove unneeded deprecation guards

No deprecated api used in here, it seems.

8 years agoDon't place dnd cursor in placeholder text
Matthias Clasen [Sun, 17 Dec 2017 15:52:33 +0000 (10:52 -0500)]
Don't place dnd cursor in placeholder text

That is just misleading - the entire placeholder text is going
to be replaced by the drop.

8 years agodnd: Get rid of IPC widgets
Benjamin Otte [Sat, 16 Dec 2017 01:46:13 +0000 (02:46 +0100)]
dnd: Get rid of IPC widgets

Instead, pass the source window to gdk_drag_begin().

Also make Wayland use this window instead of the one under the pointer
(though those 2 Windows are most likely the same anyway).

8 years agox11: Add necessary NULL check
Benjamin Otte [Sat, 16 Dec 2017 01:24:12 +0000 (02:24 +0100)]
x11: Add necessary NULL check

8 years agodnd: Remove unused function
Benjamin Otte [Sat, 16 Dec 2017 00:54:25 +0000 (01:54 +0100)]
dnd: Remove unused function

The function was referencing itself in ways that bamboozled gcc:
  static void
  foo (void)
  {
    g_signal_handlers_disconnect_by_func (NULL, foo, NULL);
  }

Well done, function, you get your own commit!

8 years agox11: Try getting ipc_window vs source_window right
Benjamin Otte [Sat, 16 Dec 2017 00:49:01 +0000 (01:49 +0100)]
x11: Try getting ipc_window vs source_window right

This is in preparation for splitting these. Unfortunately, source_window
== ipc_window, so this isn't very debuggable yet.

8 years agox11: Use gdk_drag_context_get_display()
Benjamin Otte [Sat, 16 Dec 2017 00:40:47 +0000 (01:40 +0100)]
x11: Use gdk_drag_context_get_display()

8 years agox11: Create IPC window outselves
Benjamin Otte [Fri, 15 Dec 2017 23:17:40 +0000 (00:17 +0100)]
x11: Create IPC window outselves

Ignore the passed in IPC window.

8 years agolistbox: Fix a crash during keynav
Matthias Clasen [Fri, 15 Dec 2017 23:46:21 +0000 (18:46 -0500)]
listbox: Fix a crash during keynav

The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549

8 years agodnd: Remove handler for nonexisting signal
Benjamin Otte [Fri, 15 Dec 2017 22:57:33 +0000 (23:57 +0100)]
dnd: Remove handler for nonexisting signal

The signal has been gone since e3e9bf4bea3307e9d0c6728d82f04994b069005f

8 years agogtk: Remove unused include
Benjamin Otte [Fri, 15 Dec 2017 22:53:18 +0000 (23:53 +0100)]
gtk: Remove unused include